package com.bestow.basic.service.impl;

import java.util.List;
import com.bestow.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bestow.basic.mapper.HlsBpCategoryMapper;
import com.bestow.basic.domain.HlsBpCategory;
import com.bestow.basic.service.IHlsBpCategoryService;

/**
 * 商业伙伴类别Service业务层处理
 * 
 * @author liliu
 * @date 2022-09-02
 */
@Service
public class HlsBpCategoryServiceImpl implements IHlsBpCategoryService 
{
    @Autowired
    private HlsBpCategoryMapper hlsBpCategoryMapper;

    /**
     * 查询商业伙伴类别
     * 
     * @param bpCategory 商业伙伴类别主键
     * @return 商业伙伴类别
     */
    @Override
    public HlsBpCategory selectHlsBpCategoryByBpCategory(String bpCategory)
    {
        return hlsBpCategoryMapper.selectHlsBpCategoryByBpCategory(bpCategory);
    }

    /**
     * 查询商业伙伴类别列表
     * 
     * @param hlsBpCategory 商业伙伴类别
     * @return 商业伙伴类别
     */
    @Override
    public List<HlsBpCategory> selectHlsBpCategoryList(HlsBpCategory hlsBpCategory)
    {
        return hlsBpCategoryMapper.selectHlsBpCategoryList(hlsBpCategory);
    }

    /**
     * 新增商业伙伴类别
     * 
     * @param hlsBpCategory 商业伙伴类别
     * @return 结果
     */
    @Override
    public int insertHlsBpCategory(HlsBpCategory hlsBpCategory)
    {
        hlsBpCategory.setCreateTime(DateUtils.getNowDate());
        return hlsBpCategoryMapper.insertHlsBpCategory(hlsBpCategory);
    }

    /**
     * 修改商业伙伴类别
     * 
     * @param hlsBpCategory 商业伙伴类别
     * @return 结果
     */
    @Override
    public int updateHlsBpCategory(HlsBpCategory hlsBpCategory)
    {
        hlsBpCategory.setUpdateTime(DateUtils.getNowDate());
        return hlsBpCategoryMapper.updateHlsBpCategory(hlsBpCategory);
    }

    /**
     * 批量删除商业伙伴类别
     * 
     * @param bpCategorys 需要删除的商业伙伴类别主键
     * @return 结果
     */
    @Override
    public int deleteHlsBpCategoryByBpCategorys(String[] bpCategorys)
    {
        return hlsBpCategoryMapper.deleteHlsBpCategoryByBpCategorys(bpCategorys);
    }

    /**
     * 删除商业伙伴类别信息
     * 
     * @param bpCategory 商业伙伴类别主键
     * @return 结果
     */
    @Override
    public int deleteHlsBpCategoryByBpCategory(String bpCategory)
    {
        return hlsBpCategoryMapper.deleteHlsBpCategoryByBpCategory(bpCategory);
    }
}
